import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/education/education_summary_lesson_entity.dart';

EducationSummaryLessonEntity $EducationSummaryLessonEntityFromJson(Map<String, dynamic> json) {
  final EducationSummaryLessonEntity educationSummaryLessonEntity = EducationSummaryLessonEntity();
  final int? selectCount = jsonConvert.convert<int>(json['selectCount']);
  if (selectCount != null) {
    educationSummaryLessonEntity.selectCount = selectCount;
  }
  final String? surveyPositionId = jsonConvert.convert<String>(json['surveyPositionId']);
  if (surveyPositionId != null) {
    educationSummaryLessonEntity.surveyPositionId = surveyPositionId;
  }
  final String? surveyTypeDicId = jsonConvert.convert<String>(json['surveyTypeDicId']);
  if (surveyTypeDicId != null) {
    educationSummaryLessonEntity.surveyTypeDicId = surveyTypeDicId;
  }
  final String? surveyTypeDicName = jsonConvert.convert<String>(json['surveyTypeDicName']);
  if (surveyTypeDicName != null) {
    educationSummaryLessonEntity.surveyTypeDicName = surveyTypeDicName;
  }
  final String? textbookTypeDicId = jsonConvert.convert<String>(json['textbookTypeDicId']);
  if (textbookTypeDicId != null) {
    educationSummaryLessonEntity.textbookTypeDicId = textbookTypeDicId;
  }
  final int? wrongCount = jsonConvert.convert<int>(json['wrongCount']);
  if (wrongCount != null) {
    educationSummaryLessonEntity.wrongCount = wrongCount;
  }
  return educationSummaryLessonEntity;
}

Map<String, dynamic> $EducationSummaryLessonEntityToJson(EducationSummaryLessonEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['selectCount'] = entity.selectCount;
  data['surveyPositionId'] = entity.surveyPositionId;
  data['surveyTypeDicId'] = entity.surveyTypeDicId;
  data['surveyTypeDicName'] = entity.surveyTypeDicName;
  data['textbookTypeDicId'] = entity.textbookTypeDicId;
  data['wrongCount'] = entity.wrongCount;
  return data;
}

extension EducationSummaryLessonEntityExtension on EducationSummaryLessonEntity {
  EducationSummaryLessonEntity copyWith({
    int? selectCount,
    String? surveyPositionId,
    String? surveyTypeDicId,
    String? surveyTypeDicName,
    String? textbookTypeDicId,
    int? wrongCount,
  }) {
    return EducationSummaryLessonEntity()
      ..selectCount = selectCount ?? this.selectCount
      ..surveyPositionId = surveyPositionId ?? this.surveyPositionId
      ..surveyTypeDicId = surveyTypeDicId ?? this.surveyTypeDicId
      ..surveyTypeDicName = surveyTypeDicName ?? this.surveyTypeDicName
      ..textbookTypeDicId = textbookTypeDicId ?? this.textbookTypeDicId
      ..wrongCount = wrongCount ?? this.wrongCount;
  }
}
